home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / python / maclibnx.lha / getbootvol.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-14  |  336 b   |  18 lines

  1. /* Return the name of the boot volume (not the current directory).
  2.    Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
  3. */
  4.  
  5. #include "macdefs.h"
  6.  
  7. char *
  8. getbootvol()
  9. {
  10.     short vrefnum;
  11.     static char name[32];
  12.     
  13.     (void) GetVol(name, &vrefnum);
  14.         /* Shouldn't fail; return ":" if it does */
  15.     strcat(name, ":");
  16.     return name;
  17. }
  18.